#include "WPILib.h"
#include "Drive.h"

Drive::Drive()
{
/*
	leftJag = new CANJaguar(5);		// These must be initialized in the same order
	rightJag = new CANJaguar(3);	// as they are declared above.
	leftJag2 = new CANJaguar(4);
	rightJag2 = new CANJaguar(2);
*/
	leftJag = new Jaguar(4);		// These must be initialized in the same order
	leftJag2 = new Jaguar(3);
	rightJag = new Jaguar(2);	// as they are declared above.
	rightJag2 = new Jaguar(1);
	//myRobot = new RobotDrive(leftJag, rightJag);
	myRobot = new RobotDrive(leftJag, leftJag2, rightJag, rightJag2);
	//myRobot->SetSafetyEnabled(false);
	shifter = new DoubleSolenoid(5,6);
	//myRobot->SetInvertedMotor(RobotDrive::kFrontRightMotor, true);
	//myRobot->SetInvertedMotor(RobotDrive::kFrontLeftMotor, true);
	//myRobot->SetInvertedMotor(RobotDrive::kRearRightMotor, true);
	//myRobot->SetInvertedMotor(RobotDrive::kRearLeftMotor, true);
}//end of constructor


Drive::~Drive()
{
	delete leftJag;
	delete leftJag2;
	delete rightJag;
	delete rightJag2;
	delete myRobot;
	delete shifter;
	
	leftJag = NULL;
	leftJag2 = NULL;
	rightJag = NULL;
	rightJag2 = NULL;
	myRobot = NULL;
	shifter = NULL;

}
